﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HMIS.Infrastructure.Core.Repositories;
using HMIS.Infrastructure.Core;
using HMIS.FrameWork.DomainBase;

namespace HMIS.Infrastructure.Facade
{
	public class DicCategoryFacadeImpl : IDicCategoryFacade
	{
		public readonly IDicCategoryRepository DicCategoryRepository;

		public DicCategoryFacadeImpl(IDicCategoryRepository DicCategoryRepository)
		{
			this.DicCategoryRepository = DicCategoryRepository;
		}

		#region 成员

		public void SaveOrUpdate(DicCategory entity)
		{
			this.DicCategoryRepository.SaveOrUpdate(entity);
		}

		public DicCategory GetDicCategory(string id)
		{
			return this.DicCategoryRepository.Get(id);
		}

		public DicCategory LoadDicCategory(string id)
		{
			return this.DicCategoryRepository.Load(id);
		}

		public void DeleteDicCategory(string id)
		{
			this.DicCategoryRepository.Delete(id);
		}

		public IList<DicCategory> GetAll()
		{
			return this.DicCategoryRepository.GetAll();
		}

		public IList<DicCategory> QueryPlist(string query, int start, int limit, out long total)
		{
			return DicCategoryRepository.QueryPlist(query, start, limit, out total);
		}

		public IList<DicCategory> GetPlist(int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return DicCategoryRepository.GetPlistAll(start, limit, sort, dir, filters, out total);
		}

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
		{
			return DicCategoryRepository.IsFieldExist(fieldName, fieldValue, id);
		}

		#endregion
	}
}
